import request from '@/utils/request'

export function add(data) {
  return request({
    url: 'api/remoteAgent/add',
    method: 'post',
    data
  })
}

export function saveAndInstall(data) {
  return request({
    url: 'api/remoteAgent/saveAndInstall',
    method: 'post',
    data
  })
}

export function saveAll(data) {
  return request({
    url: 'api/remoteAgent/saveAll',
    method: 'post',
    data
  })
}

export function saveAndInstallAll(data) {
  return request({
    url: 'api/remoteAgent/saveAndInstallAll',
    method: 'post',
    data
  })
}

export function install(data) {
  return request({
    url: 'api/remoteAgent/install',
    method: 'post',
    data
  })
}

export function start(data) {
  return request({
    url: 'api/remoteAgent/start',
    method: 'post',
    data: data
  })
}

export function stop(data) {
  return request({
    url: 'api/remoteAgent/stop',
    method: 'post',
    data: data
  })
}

export function restart(data) {
  return request({
    url: 'api/remoteAgent/restart',
    method: 'post',
    data: data
  })
}

export function upgrade(data) {
  return request({
    url: 'api/remoteAgent/upgrade',
    method: 'post',
    data: data
  })
}

export function restore(data) {
  return request({
    url: 'api/remoteAgent/restore',
    method: 'post',
    data: data
  })
}

export function checkConnect(data) {
  return request({
    url: 'api/remoteAgent/checkConnect',
    method: 'post',
    data: data
  })
}

export default { add, saveAndInstall, saveAll, saveAndInstallAll, install, start, stop, restart, upgrade,
  restore, checkConnect }
